package pers.cl.dubbo.api.model;

import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author chenlei
 * @date 2020/1/10
 * @description
 **/
public class User implements Serializable {

    @NotNull(message = "id不能为空")
    private String id;

    @NotNull(message = "userName不能为空")
    @Length(min = 2,message = "userName最小长度为2")
    private String userName;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
}
